package com.huawei.windows;

import javax.swing.*;
import java.awt.*;

public class RockScissorsPaperWindow extends JFrame {
    private  JPanel jPanel;
    private  JLabel userLabel;
    private  JButton startButton;
    private  JButton stopButton;

    public RockScissorsPaperWindow(String title) throws HeadlessException {
        super(title);
        init();
    }

    private void init(){
        setSize(500,500);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setVisible(true);

        FlowLayout layout = new FlowLayout();
        jPanel = new JPanel(layout);
        userLabel = new JLabel("玩家姓名");
        startButton = new JButton("开始游戏");

        jPanel.add(startButton);
        jPanel.add(userLabel);

        setContentPane(jPanel);
    }
}
